package com.techstar.ats.codec.history.decoder;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.codec.StringCodec;
import com.techstar.ats.dxp.history.rep.F27ReportNack;
import com.techstar.ats.type.NackType;

public enum F27ReportNackDecoder implements ReportDecoder<F27ReportNack> {
	INSTANCE;

	public F27ReportNack create() {
		return new F27ReportNack();
	}

	public void decode(ByteBuf buf, F27ReportNack value) {
		ReportDecoder.super.decode(buf, value);
		value.result = NackType.valueOf(buf.readInt());
		value.content = (new StringCodec(50)).get(buf);
	}
}
